package com.gxar.navigation.server.base.model.node.vo;

import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.RequiredArgsConstructor;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;

/**
 * @author linsy
 * @version 1.0
 * @created 2023/9/12 14:49
 */
@Data
@ApiModel("坐标点视图")
@NoArgsConstructor
@AllArgsConstructor
public class LocationVO {

    @ApiModelProperty("经度")
    @JSONField(name = "longitude")
    @JsonProperty("longitude")
    @NotBlank(message = "请填写经度")
    @Digits(integer = 6, fraction = 6, message = "限定小数点后六位")
    private Double longitude;

    @ApiModelProperty("纬度")
    @JSONField(name = "latitude")
    @JsonProperty("latitude")
    @NotBlank(message = "请填写纬度")
    @Digits(integer = 6, fraction = 6, message = "限定小数点后六位")
    private Double latitude;

}
